//入口配置
const Browserify = require("browserify");
const gulp = require("gulp");

module.exports.paths = {
    pages: ["../src/*.html"]
};

// Browserify 实例
module.exports.brows = Browserify({
    basedir: ".",
    debug: true,
    entries: ["../src/main.ts"],
    cache:  {},
    packageCache: {}
});

module.exports.target = "../dist";

//一定要返回一个 stream 或者一个 promise
gulp.task("copy-html", function(){
    var stream = gulp.src(module.exports.paths.pages).pipe(gulp.dest(module.exports.target));
    return stream;
})
